package s19.ch22.ex1;

import java.awt.Component;
import java.awt.GridLayout;

import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.JTextField;

public class MyFirstSwingApp {

	public static void main(String[] args) {

		JFrame jFrame = new JFrame("My First Swing App");

		jFrame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
		JPanel jPanel = new JPanel();
		jFrame.add(jPanel);
		JLabel jLabel = new JLabel("Enter Age");
		jPanel.add(jLabel);
		JTextField jTextField = new JTextField(10);
		jPanel.add(jTextField);
		JButton jButton = new JButton("ok");
		GridLayout gridLayout = new GridLayout();
		gridLayout.setColumns(2);
		jPanel.add(jButton);
		jFrame.setSize(400, 200);
		jFrame.setVisible(true);
		

	}

}
